package com.ktjy.proxy;

import java.lang.reflect.Proxy;

public class IntermediaryJdkProxyFactory {

    public static APerson getProxy(Object target) {
        IntermediaryImpl intermediary = new IntermediaryImpl(target);
        return (APerson) Proxy.newProxyInstance(target.getClass().getClassLoader(),
                target.getClass().getInterfaces(), intermediary);
    }
}
